<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			var date1 = new Date();
			console.log(date1);//Thu Feb 28 2019 16:47:24 GMT+0800
			var date2 = new Date("2013/3/20 11:12");//Wed Mar 20 2013 11:12:00 GMT+0800
			console.log(date2);
			var year = date1.getFullYear();
			console.log("year: " + year);//2019
			var month = date1.getMonth();
			console.log("month: " + month);// 1
			var day = date1.getDate();
			console.log("day: " + day);
			console.log(year + "年" + (month + 1) + "月" + day + "日");
			console.log(date1.toLocaleDateString());//2019/2/28
			console.log(date1.toLocaleTimeString());//下午4:53:36
		</script>
	</head>
	<body>
	</body>
</html>
